#ifndef		LIST_H__
#define		LIST_H__ 1

struct		list
{
  void		*value;
  struct list	*next;
};

typedef struct list s_list;
typedef int (*f_list_cmp) (void *, void *);
typedef void (*f_list_foreach) (void *elem, void* arg);

s_list		*list_add(s_list **list, void *value);
void		destruct_list(s_list *list);
void		list_foreach(s_list *list, void *arg, f_list_foreach cb);
void		*list_find(s_list *list, void *elem, int (*filter)(void *, void *));

#endif
